sub add
{
   $result = $_[0] + $_[1];
   print "The result was: $result\n";
}
sub div
{
   $result = $_[0] / $_[1];
   print "The result was: $result\n";
}
sub subs
{
   $result = $_[0] - $_[1];
   print "The result was: $result\n";
}

print "enter the two numbers";
$var1 = <stdin>;
$var2 = <stdin>;
print "enter 1 for addition \n two for division \n 3 for substraction ";



$var3= <stdin>;
if ( $var3 == 1 )
{
add($var1,$var2);
}
elsif ($var3 == 2 )
{

div($var1, $var2);
}
elsif ( $var3 == 3 )
{
subs($var1,$var2);

}

   


